package com.itheima;

public class DiGui {
    public static void main(String[] args) {
        int sum = getSum(100);
        System.out.println("sum = " + sum);
    }

    public static int getSum(int n) {
        if (n == 1) {
            return 1;
        }
        return getSum(n - 1) + n;

    }
}
